<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:local="clr-namespace:ICSharpCode.SharpDevelop.Widgets"
>
	<ResourceDictionary.MergedDictionaries>
		<ResourceDictionary Source="/ICSharpCode.SharpDevelop.Widgets;component/NumericUpDown.xaml" />
		<ResourceDictionary Source="/ICSharpCode.SharpDevelop.Widgets;component/ZoomScrollViewer.xaml" />
	</ResourceDictionary.MergedDictionaries>
	
	<!-- Template for CollapsiblePanel -->
	<Style TargetType="{x:Type local:CollapsiblePanel}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="local:CollapsiblePanel">
					<ControlTemplate.Resources>
						<local:CollapsiblePanelProgressToVisibilityConverter x:Key="visibilityConverter"/>
					</ControlTemplate.Resources>
					<Border
						BorderThickness="{TemplateBinding Border.BorderThickness}"
						BorderBrush="{TemplateBinding Border.BorderBrush}"
						Background="{TemplateBinding Panel.Background}"
						SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"
						Name="PART_Border"
						Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=AnimationProgress, Converter={StaticResource visibilityConverter}}"
					>
						<Border.LayoutTransform>
							<ScaleTransform ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=AnimationProgressX}"
							                ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=AnimationProgressY}"/>
						</Border.LayoutTransform>
						<ContentPresenter
							Margin="{TemplateBinding Control.Padding}"
							Content="{TemplateBinding ContentControl.Content}"
							ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
							ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
							HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
							VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
							SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	
	<!-- Template for RadioButtonGroup -->
	<!-- Necessary because Selector does not have a template by default. -->
	<Style TargetType="{x:Type local:RadioButtonGroup}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type local:RadioButtonGroup}">
					<Border BorderThickness="{TemplateBinding Control.BorderThickness}"
					        BorderBrush="{TemplateBinding Control.BorderBrush}"
					        Background="{TemplateBinding Control.Background}"
					        Padding="{TemplateBinding Control.Padding}"
					        SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}">
						<ItemsPresenter />
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
		<Setter Property="ItemsPanel">
			<Setter.Value>
				<ItemsPanelTemplate>
					<local:StackPanelWithSpacing SpaceBetweenItems="5"/>
				</ItemsPanelTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>